//
//  GoodsCell.m
//  gungunchou
//
//  Created by lyzbmacos3 on 2018/12/6.
//  Copyright © 2018年 xskj. All rights reserved.
//

#import "GoodsDesCell.h"

@implementation GoodsDesCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(ProductModel *)model
{
    if (model) {
        _model = model;
        self.nameLbl.text = model.ProName;
//        self.desLbl.text = model.Desc;
        
        if (!self.cycleScrollView) {
            self.cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, CGRectGetHeight(self.bannerView.bounds)) delegate:self placeholderImage:nil];
            [self.bannerView addSubview:self.cycleScrollView];
        }
        
        NSMutableArray *imgMArr = NSMutableArray.new;
        for (NSString *imgUrl in self.model.Images) {
            [imgMArr addObject:imgUrl];
        }
        self.cycleScrollView.imageURLStringsGroup = imgMArr;
    }
}

@end
